package com.kingdee.eas.custom.rcbudget.ekingwin.www.esb.QMYX_SUNAC_363_easBrokerageBillApprove;

import com.kingdee.eas.custom.rcbudget.ekingwin.www.esb.error.v1.ErrorType;
import java.io.IOException;
import java.io.Serializable;
import javax.xml.namespace.QName;
import org.apache.axis.AxisFault;
import org.apache.axis.description.ElementDesc;
import org.apache.axis.description.TypeDesc;
import org.apache.axis.encoding.Deserializer;
import org.apache.axis.encoding.SerializationContext;
import org.apache.axis.encoding.Serializer;
import org.apache.axis.encoding.ser.BeanDeserializer;
import org.apache.axis.encoding.ser.BeanSerializer;

public class QueryFault_Element extends AxisFault
  implements Serializable
{
  private ErrorType queryFault;
  private Object __equalsCalc = null;

  private boolean __hashCodeCalc = false;

  private static TypeDesc typeDesc = new TypeDesc(QueryFault_Element.class, true);

  static {
    typeDesc.setXmlType(new QName("http://www.ekingwin.com/esb/QMYX_SUNAC_363_easBrokerageBillApprove", ">QueryFault"));
    ElementDesc elemField = new ElementDesc();
    elemField.setFieldName("queryFault");
    elemField.setXmlName(new QName("http://www.ekingwin.com/esb/QMYX_SUNAC_363_easBrokerageBillApprove", "QueryFault"));
    elemField.setXmlType(new QName("http://www.ekingwin.com/esb/error/v1", "errorType"));
    elemField.setNillable(false);
    typeDesc.addFieldDesc(elemField);
  }

  public QueryFault_Element()
  {
  }

  public QueryFault_Element(ErrorType queryFault)
  {
    this.queryFault = queryFault;
  }

  public ErrorType getQueryFault()
  {
    return this.queryFault;
  }

  public void setQueryFault(ErrorType queryFault)
  {
    this.queryFault = queryFault;
  }

  public synchronized boolean equals(Object obj)
  {
    if (!(obj instanceof QueryFault_Element)) return false;
    QueryFault_Element other = (QueryFault_Element)obj;
    if (obj == null) return false;
    if (this == obj) return true;
    if (this.__equalsCalc != null) {
      return this.__equalsCalc == obj;
    }
    this.__equalsCalc = obj;

    boolean _equals = 
      ((this.queryFault == null) && (other.getQueryFault() == null)) || (
      (this.queryFault != null) && 
      (this.queryFault.equals(other.getQueryFault())));
    this.__equalsCalc = null;
    return _equals;
  }

  public synchronized int hashCode()
  {
    if (this.__hashCodeCalc) {
      return 0;
    }
    this.__hashCodeCalc = true;
    int _hashCode = 1;
    if (getQueryFault() != null) {
      _hashCode += getQueryFault().hashCode();
    }
    this.__hashCodeCalc = false;
    return _hashCode;
  }

  public static TypeDesc getTypeDesc()
  {
    return typeDesc;
  }

  public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType)
  {
    return 
      new BeanSerializer(
      _javaType, _xmlType, typeDesc);
  }

  public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType)
  {
    return 
      new BeanDeserializer(
      _javaType, _xmlType, typeDesc);
  }

  public void writeDetails(QName qname, SerializationContext context)
    throws IOException
  {
    context.serialize(qname, null, this);
  }
}